<%@ page language="java" contentType="text/html;charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%
	response.setDateHeader("Expires", 0);
	response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Pragma", "no-cache");
%>
<head>
<meta charset="UTF-8">
 <title>TYOMS</title>
 <link rel="icon" href="<%=path%>/favicon.ico" mce_href="<%=path%>/favicon.ico" type="image/x-icon">
 <link rel="shortcut icon" href="<%=path%>/favicon.ico" mce_href="<%=path%>/favicon.ico" type="image/x-icon">
</head>
<body>
<script type="text/javascript">
	var basePath = '<%=basePath%>';
	
</script>
<script type="text/javascript">
		//获取浏览器页面可见高度和宽度
        var _PageHeight_bak = document.documentElement.clientHeight,
            _PageWidth_bak = document.documentElement.clientWidth;
        var _PageHeight = document.body.clientHeight;
         var    _PageWidth = document.body.clientWidth;
         _PageHeight = _PageHeight<_PageHeight_bak?_PageHeight_bak:_PageHeight;
        //计算loading框距离顶部和左部的距离（loading框的宽度为215px，高度为61px）
        var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,
            _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;
        //在页面未加载完毕之前显示的loading Html自定义内容
        var _LoadingHtml = '<div id=\"loadingDiv\" style=\"position:absolute;left:0;width:100%;height:' + _PageHeight + 'px;top:0;background:#f3f8ff;opacity:1;filter:alpha(opacity=100);z-index:10000;\"><div style=\"position: absolute; cursor1: wait; left: ' + _LoadingLeft + 'px; top:' + _LoadingTop + 'px; width: auto; height: 57px; line-height: 57px; padding-left: 50px; padding-right: 5px; background: #fff url(<%=basePath%>js/jquery-easyui-1.4.1/themes/default/images/loading.gif) no-repeat scroll 5px 10px; border: 2px solid #95B8E7; color: #696969;\">页面加载中，请等待...</div></div>';
        //呈现loading效果
        document.write(_LoadingHtml);
        //window.onload = function () {
        //    var loadingMask = document.getElementById('loadingDiv');
        //    loadingMask.parentNode.removeChild(loadingMask);
        //};
 
        //监听加载状态改变
        document.onreadystatechange = completeLoading;
 
        //加载状态为complete时移除loading效果
        function completeLoading() {
        	//alert("onreadystatechange："+document.readyState);
            if (document.readyState == "complete") {
            	//alert("complete");
                var loadingMask = document.getElementById('loadingDiv');
               loadingMask.parentNode.removeChild(loadingMask);
            }
        }
		
		</script>     
<script type="text/javascript">
//检测浏览器版本，ie版本应不低于IE9
var Sys = {};
	var ua = navigator.userAgent.toLowerCase();
	var s;
	var scan;
	(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
	(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
	(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
	(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
	(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
	//以下进行测试

	if(Sys.ie)
	{ 
		if(Sys.ie.match(/6./i)=="6."|| Sys.ie.match(/7./i)=="7."||Sys.ie.match(/8./i)=="8."){
	    	scan="您使用的浏览器为ie内核"+Sys.ie+"浏览器,版本过低！系统使用过程中会有问题，请您升级至IE9及以上版本后使用。或直接使用谷歌、火狐浏览器以获得更佳的操作体验！";
	    	alert(scan);
		}
		
	}
	if(Sys.firefox)
	{    
	    scan="您使用的是firefox内核"+Sys.firefox+"浏览器，如果有问题，建议您使用ie浏览器";
	}
	if(Sys.chrome)
	{
	    scan="您使用的是chrome内核"+Sys.chrome+"浏览器，如果有问题，建议您使用ie浏览器";
	}
	if(Sys.opera) 
	{
	    scan="您使用的是opera内核"+Sys.opera+"浏览器，如果有问题，建议您使用ie浏览器";
	}
	if(Sys.safari)
	{
	    scan="您使用的是safari内核"+Sys.safari+"浏览器，如果有问题，建议您使用ie浏览器";
	}
</script>    
<script type="text/javascript">
	function contain_menu(menuid) {
		<c:forEach var="obj" items="${menu}"> 
			var x="${obj.menuid}";
			if(x==menuid) {
				return true;
			}
		</c:forEach> 
		return false;
	}
	
	//隐藏m链表包含的所有按钮
	function onLoadHideButton(m){
		//var list = eval(m);
		for(var i=0;i<m.length;i++){  
			$('#'+m[i]).linkbutton('disable');
		}  
	}
	//显示m链表包含的所有按钮
	function onLoadShowButton2(m){
		//var list = eval(m);
		for(var i=0;i<m.length;i++){  
			$('#'+m[i]).linkbutton('enable');
		}  
	}
	//根据模块号，显示需要显示的按钮，pid为模块号（按钮对应父标签页编号）
	function onLoadShowButton(pid){
		<c:forEach items='${menu}' var="s">
			if('${s.pid}' == pid && '${s.type}'=='2'){
				$('#'+'${s.url}').linkbutton('enable');
			}
		</c:forEach>
		return false;
	}
	
</script>
	<script type="text/javascript">
		function contain_menu() {
			<c:forEach var="obj" items="${menu}"> 
				var x="${obj.menuid}";
				var type="${obj.type}";
				if(type=="2") {
					$("#"+x).linkbutton("enable");
				}
				
			</c:forEach> 
			return false;
		}

</script>
	<script type="text/javascript">
	//采用jquery easyui loading css效果 
	function ajaxLoading(){ 
	    $("<div class=\"datagrid-mask\"></div>").css({display:"block",width:"100%",height:$(window).height()}).appendTo("body"); 
	    $("<div class=\"datagrid-mask-msg\"></div>").html("处理中，请稍候。。。").appendTo("body").css({display:"block",left:($(document.body).outerWidth(true) - 190) / 2,top:($(window).height() - 45) / 2}); 
	 } 
	 function ajaxLoadEnd(){ 
	     $(".datagrid-mask").remove(); 
	     $(".datagrid-mask-msg").remove();             
	} 
</script>
<style>
.datagrid-mask{position:absolute;z-index:100000;}
</style>
	<link rel="stylesheet" type="text/css" href="<%=basePath%>js/jquery-easyui-1.4.1/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>js/jquery-easyui-1.4.1/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/default.css" />
	<script type="text/javascript" src="<%=basePath%>js/jquery-easyui-1.4.1/jquery.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/jquery-easyui-1.4.1/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/common/commons.js"></script>
</body>
